home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Aztec C v5.2a disk 4.adf / 204inc_i.lzh / exec / io.i < prev    next >
Text File  |  1991-03-14  |  3KB  |  124 lines

  1.     IFND    EXEC_IO_I
  2. EXEC_IO_I    SET    1
  3. **
  4. **    $Filename: exec/io.i $
  5. **    $Release: 2.04 $
  6. **    $Revision: 36.4 $
  7. **    $Date: 90/05/10 $
  8. **
  9. **    Message structures used for device communication
  10. **
  11. **    (C) Copyright 1985,1986,1987,1988,1989 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. **
  14.  
  15.     IFND EXEC_PORTS_I
  16.     INCLUDE "exec/ports.i"
  17.     ENDC    ; EXEC_PORTS_I
  18.  
  19.     IFND EXEC_LIBRARIES_I
  20.     INCLUDE "exec/libraries.i"
  21.     ENDC    ; EXEC_LIBRARIES_I
  22.  
  23.  
  24. ;----------------------------------------------------------------
  25. ;
  26. ;   IO Request Structures
  27. ;
  28. ;----------------------------------------------------------------
  29.  
  30. ;------ Required portion of IO request:
  31.  
  32.  STRUCTURE  IO,MN_SIZE
  33.     APTR    IO_DEVICE            ; device node pointer
  34.     APTR    IO_UNIT            ; unit (driver private)
  35.     UWORD   IO_COMMAND            ; device command
  36.     UBYTE   IO_FLAGS            ; special flags
  37.     BYTE    IO_ERROR            ; error or warning code
  38.     LABEL   IO_SIZE
  39.  
  40.  
  41. ;------ Standard IO request extension:
  42.  
  43.     ULONG   IO_ACTUAL            ; actual # of bytes transfered
  44.     ULONG   IO_LENGTH            ; requested # of bytes transfered
  45.     APTR    IO_DATA            ; pointer to data area
  46.     ULONG   IO_OFFSET            ; offset for seeking devices
  47.     LABEL   IOSTD_SIZE
  48.  
  49.  
  50. ;------ IO_FLAGS bit definitions:
  51.  
  52.     BITDEF  IO,QUICK,0            ; complete IO quickly
  53.  
  54.  
  55. ;----------------------------------------------------------------
  56. ;
  57. ;   Standard Device Library Functions
  58. ;
  59. ;----------------------------------------------------------------
  60.  
  61.         LIBINIT
  62.  
  63.         LIBDEF  DEV_BEGINIO    ; process IO request
  64.         LIBDEF  DEV_ABORTIO    ; abort IO request
  65.  
  66.  
  67. ;----------------------------------------------------------------
  68. ;
  69. ;   IO Function Macros
  70. ;
  71. ;----------------------------------------------------------------
  72.  
  73. BEGINIO     MACRO
  74.         LINKLIB DEV_BEGINIO,IO_DEVICE(A1)
  75.         ENDM
  76.  
  77. ABORTIO     MACRO
  78.         LINKLIB DEV_ABORTIO,IO_DEVICE(A1)
  79.         ENDM
  80.  
  81.  
  82. ;----------------------------------------------------------------
  83. ;
  84. ;   Standard Device Command Definitions
  85. ;
  86. ;----------------------------------------------------------------
  87.  
  88. ;------ Command definition macro:
  89. DEVINIT     MACRO   ; [baseOffset]
  90.         IFC     '\1',''
  91. CMD_COUNT   SET     CMD_NONSTD
  92.         ENDC
  93.         IFNC    '\1',''
  94. CMD_COUNT   SET     \1
  95.         ENDC
  96.         ENDM
  97.  
  98. DEVCMD        MACRO   ; cmdname
  99. \1        EQU     CMD_COUNT
  100. CMD_COUNT   SET     CMD_COUNT+1
  101.         ENDM
  102.  
  103.  
  104. ;------ Standard device commands:
  105.  
  106.         DEVINIT 0
  107.  
  108.         DEVCMD  CMD_INVALID    ; invalid command
  109.         DEVCMD  CMD_RESET        ; reset as if just inited
  110.         DEVCMD  CMD_READ        ; standard read
  111.         DEVCMD  CMD_WRITE        ; standard write
  112.         DEVCMD  CMD_UPDATE        ; write out all buffers
  113.         DEVCMD  CMD_CLEAR        ; clear all buffers
  114.         DEVCMD  CMD_STOP        ; hold current and queued
  115.         DEVCMD  CMD_START        ; restart after stop
  116.         DEVCMD  CMD_FLUSH        ; abort entire queue
  117.  
  118.  
  119. ;------ First non-standard device command value:
  120.  
  121.         DEVCMD  CMD_NONSTD
  122.  
  123.     ENDC    ; EXEC_IO_I
  124.